package com.ibeetl.admin.console.service.stat;

import com.ibeetl.admin.console.dao.business.CoinGetDao;
import com.ibeetl.admin.console.dao.stat.ReportStatDao;
import com.ibeetl.admin.console.web.dto.PayOrderExcelExportData;
import com.ibeetl.admin.core.entity.PayOrder;
import com.ibeetl.admin.core.entity.business.CoinGet;
import com.ibeetl.admin.core.entity.business.ScoreRule;
import com.ibeetl.admin.core.entity.stat.ReportStat;
import com.ibeetl.admin.core.rbac.tree.OrgItem;
import com.ibeetl.admin.core.service.BaseService;
import org.beetl.sql.core.engine.PageQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;

@Service
@Transactional
public class ReportStatService extends BaseService<ReportStat> {

	@Autowired
	ReportStatDao reportStatDao;

	/**
	 * 根据条件查询
	 *
	 * @param query
	 */
	public void queryByCondtion(PageQuery<ReportStat> query) {
		PageQuery<ReportStat> ret = reportStatDao.queryByCondtion(query);
		queryListAfter(ret.getList());
	}


    public List<ReportStat> queryExcel(PageQuery<ReportStat> query) {
		PageQuery<ReportStat> ret = reportStatDao.queryByCondtion(query);
		List<ReportStat> list = ret.getList();
		return list;
    }
}
